<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input type="hidden" name="row[id]" value="{$row.id|htmlentities}">
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-4">
            {$groupList}
        </div>
    </div> -->
    <div class="form-group">
        <label for="c-avatar" class="control-label col-xs-12 col-sm-2">头像:</label>
        <div class="col-xs-12 col-sm-4">
            <input type="text" name="row[avatar]" id="c-avatar" class="form-control" value="{$row.avatar}" />
            <ul class="row list-inline faupload-preview" id="p-avatar"></ul>
        </div>
    </div>

    <div class="form-group">
        <label for="c-local" class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-4">
            <button type="button" id="faupload-local" class="btn btn-primary faupload" data-input-id="c-avatar"
                data-multiple="false" data-preview-id="p-avatar" data-url="{:url('ajax/upload')}"><i
                    class="fa fa-upload"></i>上传到服务器</button>
        </div>
    </div>
    <!--    <div class="form-group">
        <label for="c-username" class="control-label col-xs-12 col-sm-2">{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-username" class="form-control" name="row[username]" type="text" value="{$row.username|htmlentities}">
        </div>
    </div>-->
    <div class="form-group">
        <label for="c-nickname" class="control-label col-xs-12 col-sm-2">{:__('Nickname')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-nickname" class="form-control" name="row[nickname]" type="text"
                value="{$row.nickname|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-password" data-rule="password" class="form-control" name="row[password]" type="password"
                placeholder="{:__('Leave password blank if dont want to change')}" autocomplete="new-password" />
        </div>
    </div>
    <!-- <div class="form-group">
        <label for="c-email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-email" data-rule="email" class="form-control" name="row[email]" type="text" value="{$row.email|htmlentities}">
        </div>
    </div> -->
    <div class="form-group">
        <label for="c-mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-mobile" data-rule="required" data-rule="mobile" class="form-control" name="row[mobile]"
                type="text" value="{$row.mobile|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否隐藏')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_hidden]', ['1'=>__('是'), '0'=>__('否')], $row['is_hidden'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否开启隐藏')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[admin_status]', [ '1'=>__('否'),'0'=>__('是')], $row['admin_status'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">级别:</label>
        <div class="col-xs-12 col-sm-4">
            {$expertLevelList}
        </div>
    </div>

    <div class="form-group {if $row['expert_level'] != 3} hidden {/if}" id="is_area_manager_group"  >
            <label class="control-label col-xs-12 col-sm-2">管辖区域:</label>
            <div class="col-xs-12 col-sm-6">
                <div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
                    <select class="province form-control" name="row[province_id]" data-url="ajax/area2">
                        <option value="{$row.province_id|htmlentities}"></option>
                    </select>
                    <select class="city form-control" name="row[city_id]" data-query-name="province" data-url="ajax/area2">
                        <option value="{$row.city_id|htmlentities}"></option>
                    </select>
                    <select class="area form-control" name="row[area_id]" data-query-name="city" data-url="ajax/area2">
                        <option value="{$row.area_id|htmlentities}"></option>
                    </select>
                </div>
            </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否禁用登录')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>